package com.example.yls.optimizationeeviewtest;

import android.app.Activity;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

import java.util.ArrayList;

public class BaseActivity extends AppCompatActivity {

    ArrayList<Activity> list=new ArrayList<>();
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_base);
     if (this.getSupportActionBar()!=null){
        this.getSupportActionBar().hide();
     }
        list.add(this);
    }

    protected void onDestroy() {
        super.onDestroy();
        list.remove(this);
    }

   public void finshAll() {
           for (Activity activity:list){
               activity.finish();
           }
    }

}
